<script setup>
import { getBannerAPI } from '@/apis/home'
import { onMounted, ref } from 'vue'
const bannerList = ref([])
const getBannerList = async () =>{
  const res = await getBannerAPI()
  bannerList.value = res.result
}
onMounted(() => {
  getBannerList()
})
</script>

<template>
  <div class="bannerContainer" style="height: 450px;position: absolute;left: 250px;width: 990px;z-index: 1;">
    <el-carousel height="450px">
      <el-carousel-item v-for="item in bannerList" :key="item.id">
        <img style="width: 100%;height: 100%;" :src="item.imgUrl">
      </el-carousel-item>
    </el-carousel>

  </div>
</template>

<style scoped>

</style>